package cn.controlsys.common.entity;


/**
 * Created by yemao on 2017/9/6.
 *
 * @Author yemao
 * @Email yrmao9893@163.com
 * @Dec http请求返回结果实体
 */
public class RequestResult<T>{
    private int code;
    private String msg;
    private T data;
    private long timestamp;

    public RequestResult(int code, String msg, T result){
        this.code=code;
        this.msg=msg;
        this.data=result;
        this.timestamp=System.currentTimeMillis();
    }

    public RequestResult(){

    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T result) {
        this.data = result;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }

}
